using System.Collections.Generic;
using Objectflow.core.tests.ComposeSequentialWorkflow;

namespace Rainbow.ObjectFlow.Engine
{
    internal class TaskList<T> : ICommandListener<T>
    {
        internal IList<OperationDuplex<T>> Tasks;       

        public TaskList()
        {
            Tasks = new List<OperationDuplex<T>>();
        }

        public virtual void OperationAdded(OperationDuplex<T> task)
        {
            Tasks.Add(task);
        }

        public int Count
        {
            get
            {
                return Tasks.Count;
            }
        }
    }
}